<?php

class ZFBootstrap_Grid_Template_Table extends Bvb_Grid_Template_Table {

	public function globalStart () {
		return "<table id=\"{GRID_ID}\" class=\"table table-hover\">";
	}

	public function globalEnd () {
		return '</table>';
	}

	public function images ($url) {
		$images = parent::images($url);

		$images['asc'] = '<i class="icon-chevron-up"></i>';
		$images['desc'] = '<i class="icon-chevron-down"></i>';

		return $images;
	}

	public function noResults ($message) {
		// str_repeat("<td>&nbsp;</td>", ($this->options['colspan']-1))
		//return "<tfoot><tr><td  " . $this->getClass('noRecords') . " >$message</td></tr></tfoot>" . PHP_EOL;
		return '';
	}

	public function titlesStart () {
		return "<thead><tr>\n";
	}

	public function titlesEnd () {
		return "</tr></thead>\n";
	}

	public function titlesLoop ($title, $colspan) {
		return '  ' . parent::titlesLoop($title, $colspan) . "\n";
	}

	public function loopStart ($class, $style) {
		return parent::loopStart($class, $style) . "\n";
	}

	public function loopLoop ($value, $class, $style, $rowspan, $colspan) {
		return '  ' . parent::loopLoop($value, $class, $style, $rowspan, $colspan) . "\n";
	}

	public function pagination ($pagination, $numberRecords, $perPage, $pageSelect) {
		return $pagination . ' <p class="pagination-registros">Total: ' . $numberRecords . ' registros</p>';
	}

}